<template>
  <div>
      <i-card :title="userInfo.nickName" :full="true" extra=">" :thumb="userInfo.avatarUrl">
<!--        <view slot="content">这是我来到大学的第xx天</view>-->
        <view slot="footer">更多</view>
      </i-card>
    <i-cell-group  slot="content">
      <i-cell title="个人信息" is-link url="/pages/user/profile/main"></i-cell>
      <i-cell title="我的宿舍" is-link url="/pages/user/myDom/main"></i-cell>
      <i-cell title="反馈意见" open-type='feedback' is-link url="/pages/dashboard/index"></i-cell>
      <i-cell title="关于" is-link url="/pages/user/about/main"></i-cell>
    </i-cell-group>
    </div>
</template>

<script>
  import store from "../../store";

  export default {
    name: "index",
    components: {
    },
    data() {
      return {
          userInfo: {}
      }
    },
    methods: {
    },
    mounted() {
      this.userInfo = store.state.userInfo;
      //   console.log(this.userInfo);
      wx.login({
        success (res) {
          console.log(res);
          if (res.code) {
            console.log('success')
            //发起网络请求
            wx.request({
              url: 'https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code'
            })
          } else {
            console.log('登录失败！' + res.errMsg)
          }
        }
      })
    }
  }
</script>

<style scoped>
  div img {
      /*width: 100%;*/
  }
</style>
